package com.caiheng.api.service.examine.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.caiheng.api.dao.examine.ExamineApproveTemplateUserMapper;
import com.caiheng.api.entity.examine.ExamineApproveTemplateUser;
import com.caiheng.api.service.base.impl.BaseServiceImpl;
import com.caiheng.api.service.examine.ExamineApproveTemplateUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 审批流程（审核人）Service业务层处理
 *
 * @author ruoyi
 * @date 2022-11-23
 */
@Service
public class ExamineApproveTemplateUserServiceImpl extends BaseServiceImpl<ExamineApproveTemplateUserMapper, ExamineApproveTemplateUser> implements ExamineApproveTemplateUserService {

    @Resource
    private ExamineApproveTemplateUserMapper approveTemplateUserMapper;

    @Override
    public List<ExamineApproveTemplateUser> getCopyUserList(int templateId) {
        QueryWrapper<ExamineApproveTemplateUser> qw = new QueryWrapper<>();
        qw.eq("template_id",templateId);
        qw.eq("is_copy", 1);
        return approveTemplateUserMapper.selectList(qw);
    }
}
